from django_filters.rest_framework import FilterSet, DjangoFilterBackend
from .models import *

class SystemMenFilter(FilterSet):
    '''
    系统菜单 过滤器
    '''
    class Meta:
        model = SystemMen
        fields = ['menuName','status']


class SystemRoleFilter(FilterSet):
    '''
    系统角色 过滤器
    '''
    class Meta:
        model = SystemRole
        fields = ['role_name','role_key','status']


class SysLoginInfoFilter(FilterSet):
    '''
    登录日志 过滤器
    '''
    class Meta:
        model = SysLoginInfo
        fields = ['user_name','ipaddr','status']


class SysOperLogFilter(FilterSet):
    '''
    操作日志 过滤器
    '''
    class Meta:
        model = SysOperLog
        fields = ['oper_id','oper_name','status']